package com.cyl.manager.pms.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;

import com.sincere.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 商品分类
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "pms_product_category")
public class ProductCategory {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("ID")
    private Long id;

    /**
     * 上机分类的编号：0表示一级分类
     */
    @ApiModelProperty("上级分类的编号：0表示一级分类")
    @Excel(name = "上级分类的编号：0表示一级分类")
    @TableField(value = "parent_id")
    private Long parentId;

    @ApiModelProperty("NAME")
    @Excel(name = "NAME")
    @TableField(value = "`name`")
    private String name;

    /**
     * 分类级别：0->1级；1->2级
     */
    @ApiModelProperty("分类级别：0->1级；1->2级")
    @Excel(name = "分类级别：0->1级；1->2级")
    @TableField(value = "`level`")
    private Integer level;

    /**
     * 显示状态：0->不显示；1->显示
     */
    @TableField(value = "show_status")
    @ApiModelProperty("显示状态：0->不显示；1->显示")
    @Excel(name = "显示状态：0->不显示；1->显示")
    private Integer showStatus;

    @TableField(value = "sort")
    @ApiModelProperty("SORT")
    @Excel(name = "SORT")
    private Integer sort;

    /**
     * 图标
     */
    @TableField(value = "icon")
    @ApiModelProperty("图标")
    @Excel(name = "图标")
    private String icon;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private Long createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 修改人
     */
    @TableField(value = "update_by")
    private Long updateBy;

    /**
     * 修改时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 删除标志 0 未删除 1 删除
     */
    @TableField(value = "deleted")
    @ApiModelProperty("删除标志状态")
    @Excel(name = "删除标志状态")
    @TableLogic
    private Boolean deleted;

    public static final String COL_ID = "id";

    public static final String COL_PARENT_ID = "parent_id";

    public static final String COL_NAME = "name";

    public static final String COL_LEVEL = "level";

    public static final String COL_SHOW_STATUS = "show_status";

    public static final String COL_SORT = "sort";

    public static final String COL_ICON = "icon";

    public static final String COL_CREATE_BY = "create_by";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_BY = "update_by";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_DELETED = "deleted";
}